package D240605;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegexTest {
    public static void main(String[] args) {
        String code = "484-980-749";
        // Pattern pattern = Pattern.compile("(\\d{3})-\1-\1");
        Pattern pattern = Pattern.compile("\\d{3}-\\d{3}-\\d{3}");
        Matcher matcher = pattern.matcher(code);
        System.out.println(matcher.matches());
    }
}
